﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="CusRequest.aspx.cs" Inherits="DLV.BackEnd.Pages.CusRequest" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Src="~/Controls/RequesInfor.ascx" TagPrefix="uc1" TagName="RequesInfor" %>


<asp:Content ID="Content1" ContentPlaceHolderID="placeHolderContent" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <link href="/css/popup.css" rel="stylesheet" />
    <script src="/js/jquery.popup.js"></script>
    <script src="../js/jqueryui/jquery-1.10.2.js"></script>
    <script src="../js/jqueryui/jquery.ui.core.js"></script>
    <script src="../js/jqueryui/jquery.ui.widget.js"></script>
    <script src="../js/jqueryui/jquery.ui.datepicker.js"></script>
    <script src="../js/jqwidAdd/jquery.cookie.js"></script>
    <link href="../js/jqueryui/base/jquery.ui.all.css" rel="stylesheet" />
    <script src="../js/jsReBo/jsRequest.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".txtDay").datepicker({
                defaultDate: "+1w",
                changeMonth: true,
                numberOfMonths: 1,
                dateFormat: "dd/mm/yy",
                onClose: function (selectedDate) {
                    $(".txtDay").datepicker("option", "minDate", selectedDate);
                }
            });
          
        });
    </script>
    <div class="popup-wrapper"></div>
    <%-------------------------------------------------------------popup search Tour------------------------%>
    <div class="popup-main popup-CusRequest">
        <div class="search_K">
        </div>
    </div>
    <div class="tap_main">
        <ul>
            <li><a>Yêu cầu khách hàng</a></li>
            <li><a>Đặc Tour</a></li>
        </ul>
    </div>
    <div class="frames-Conten">
        <div class="frames-Conten-left">
        </div>
        <div class="frames-Conten-right">

            <div class="tap-ui">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <ul class="tabs">
                            <li id="tab1"  ><a>Thông tin khách hàng</a></li>
                            <li  id="tab2" ><a >Request khách hàng</a></li>
                        </ul>
                        <div class="tabContainer">

                            <div id="tab1" class="tabContent">

                                <div class="k_Tour">
                                    <span class="lbnametour">Mã KH</span><br />
                                    <asp:TextBox ID="txtCusId1" runat="server" CssClass="enbale txtCusId1" AutoPostBack="True" Width="0px"></asp:TextBox>
                                    <asp:TextBox ID="txtCusCode" runat="server" CssClass="txttext txtCusCode" Width="60px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Họ và tên</span><br />
                                    <asp:TextBox ID="txtCusFullName" runat="server" CssClass="txttext txtCusFullName" Width="150px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">

                                    <asp:RadioButtonList ID="RadioButtonList1" CssClass="radio RadioButtonList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ChangedGg2">
                                        <asp:ListItem Value="0" Selected="True">Chưa xác định</asp:ListItem>
                                        <asp:ListItem Value="1">Nam</asp:ListItem>
                                        <asp:ListItem Value="2">Nữ</asp:ListItem>
                                    </asp:RadioButtonList>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Ngày Sinh</span><br />
                                    <asp:TextBox ID="txtCusDateOfBirth" runat="server" CssClass="txttext txtDay txtCusDateOfBirth" Width="65px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Quốc tịch</span><br />
                                    <asp:DropDownList ID="ddlCusNationalId" runat="server" CssClass="txttextdll ddlCusNationalId" Width="125px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:DropDownList>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Số điện thoại</span><br />
                                    <asp:TextBox ID="txtCusPhone" runat="server" CssClass="txttext txtCusPhone" Width="100px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Mail</span><br />
                                    <asp:TextBox ID="txtCusEmail" runat="server" CssClass="txttext txtCusEmail" Width="140px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Địa chỉ</span><br />
                                    <asp:TextBox ID="txtCusAddress" runat="server" CssClass="txttext txtCusAddress" Width="150px" AutoPostBack="True" OnTextChanged="ChangedGg2"></asp:TextBox>
                                </div>
                                <div class="k_Tour">
                                    <span class="lbnametour">Ghi chú</span><br />
                                    <asp:TextBox ID="txtCusNotes" runat="server" TextMode="MultiLine" CssClass="txttext txtCusNotes" Width="1125px" Height="50px"></asp:TextBox>
                                </div>
                                <div class="k_Tour_title">
                                    <input class="bntXanh bntConverRequest bntSaveRequest" value="Chọn KH" type="button" />
                                    <asp:Button ID="bntSaveUpd" CssClass="bntXanh bntSaveRequest" runat="server" Text="Lưu Cập Nhật" OnClick="bntSaveUpd_Click" OnClientClick="if ( !confirm('Bạn có muốn cập nhật không?')) return false;" />
                                    <asp:Button ID="bntSaveIns" CssClass="bntXanh bntSaveRequest" runat="server" Text="Lưu Tạo Mới" OnClick="bntSaveIns_Click" OnClientClick="if ( !confirm('Bạn có muốn thêm mới không?')) return false;" />
                                </div>
                                <br />
                                <div class="table_Tour">
                                    <asp:GridView ID="GridView2" runat="server" CssClass="mytable gvCustomers" AutoGenerateColumns="False" Width="100%" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" CellPadding="4" ForeColor="#333333" GridLines="None" EnableModelValidation="True" OnRowDeleting="GridView2_RowDeleting" OnRowDataBound="OnRowDataBound">
                                        <AlternatingRowStyle BackColor="White" />
                                        <Columns>
                                            <asp:TemplateField Visible="false">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbMa" Text='<%# Eval("CusId") %>'>&nbsp;&nbsp;  </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="STT">
                                                <ItemTemplate>
                                                    <%# Container.DataItemIndex + 1 %>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Mã KH">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusCode" Text='  <%#  Eval("CusCode")  %>'> </asp:Label>
                                                    <asp:Label runat="server" ID="lbMaAn" CssClass="enbale cusId" Text='<%# Eval("CusId") %>'>&nbsp;&nbsp;  </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Tên KH">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusFullName" Text='  <%#  Eval("CusFullName")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Giới tính">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusGender" Text=' <%# Convert.ToInt32(Eval("CusGender")) ==1  ?"Nam": Convert.ToInt32(Eval("CusGender") )==2? "Nữ" : "Chưa xác định" %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Ngày sinh">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusDateofBirth" Text='  <%#  Eval("CusDateofBirth")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Quốc tịch">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbNationalName" Text='  <%#  Eval("NationalName")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Điện Thoại">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusPhone" Text='  <%#  Eval("CusPhone")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Email">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusEmail" Text='  <%#  Eval("CusEmail")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Địa chỉ">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusAddress" Text='  <%#  Eval("CusAddress")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Số Request">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusQuantityRequest" Text='  <%#  Eval("CusQuantityRequest")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="So Booking">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusQuantityBooking" Text='  <%#  Eval("CusQuantityBooking")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:TemplateField HeaderText="Ghi chú">
                                                <ItemTemplate>
                                                    <asp:Label runat="server" ID="lbCusNotes" Text='  <%#  Eval("CusNotes")  %>'> </asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>

                                            <asp:CommandField DeleteText="xóa" ShowDeleteButton="True" ButtonType="Button">
                                                <ItemStyle CssClass="cssDell" />
                                            </asp:CommandField>
                                        </Columns>
                                        <EditRowStyle BackColor="#2461BF" />
                                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="#EFF3FB" />
                                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                    </asp:GridView>
                                </div>
                            </div>

                            <!-- / END #tab1 -->
                            <div id="tab2" class="tabContent">
                               <%-- <uc1:RequesInfor runat="server" id="RequesInfor" />--%>
                             </div>
                           

                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="bntSaveIns" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="bntSaveUpd" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
                <!-- / END .tabContainer -->
            </div>
            <div class="frames-Conten-left-input">
                <h3 class="frames-Conten-left-title">Thông Tin Khách Yêu Cầu</h3>
                <div class="frames-Conten-left-conten">
                    <div class="k_Tour_full">
                        <span class="k_Tour_title">I.Thông tin tour</span>
                        <div class="infor_search">
                            <div class="k_Tour">
                                <span class="lbnametour">Mã tour</span><br />
                                <asp:TextBox ID="txtMaTours" runat="server" CssClass="txttext txtTourMa" Width="60px" OnTextChanged="txtMaTours_TextChanged" AutoPostBack="True"></asp:TextBox>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Tên tour</span><br />
                                <asp:TextBox ID="txtTourName" runat="server" CssClass="txttext txtTourName" Width="155px" OnTextChanged="txtTourName_TextChanged" AutoPostBack="True"></asp:TextBox>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Loại tour:</span><br />
                                <asp:DropDownList ID="ddlTourType" runat="server" CssClass="txttext ddlTourType" Width="120px" OnTextChanged="ddlTourType_TextChanged" AutoPostBack="True"></asp:DropDownList>

                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Loại hình đoàn:</span><br />
                                <asp:DropDownList ID="ddlGroupType" CssClass="txttext txttextdll ddlGroupType" runat="server" Width="120px" OnSelectedIndexChanged="ddlGroupType_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>

                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Thị trường:</span><br />
                                <asp:DropDownList ID="ddlMartName" CssClass="txttext txttextdll ddlMartName" runat="server" Width="120px" OnSelectedIndexChanged="ddlMartName_SelectedIndexChanged" AutoPostBack="True"></asp:DropDownList>

                            </div>

                            <div class="k_Tour">
                                <span class="lbnametour">Số ngày</span><br />
                                <asp:TextBox ID="txtQuantityDay" runat="server" Text="0" CssClass="txttext txtQuantityDay" Width="50px" OnTextChanged="txtQuantityDay_TextChanged" AutoPostBack="True"></asp:TextBox>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Lich trình</span><br />
                                <asp:TextBox ID="txtSchedule" runat="server" CssClass="txttext txtSchedule" Width="155px" OnTextChanged="txtSchedule_TextChanged" AutoPostBack="True"></asp:TextBox>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Mùa:</span><br />
                                <asp:DropDownList ID="ddlSeason" CssClass="txttext txttextdll ddlSeason" runat="server" Width="120px" AutoPostBack="True" OnSelectedIndexChanged="ddlSeason_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Land Tours:</span><br />
                                <asp:DropDownList ID="ddlLandTour" CssClass="txttext txttextdll ddlLandTour" runat="server" Width="120px" OnSelectedIndexChanged="ddlLandTour_SelectedIndexChanged" AutoPostBack="True">
                                    <asp:ListItem Value="-1">--- Chọn Land Tours ---</asp:ListItem>
                                    <asp:ListItem Value="1">Không Land Tour</asp:ListItem>
                                    <asp:ListItem Value="2">Có Land Tour</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="k_Tour">
                                <span class="lbnametour">Ngày khởi hành</span><br />
                                <asp:TextBox ID="txtBeginDate" runat="server" CssClass="txttext txtBeginDate" Width="120px" OnTextChanged="txtBeginDate_TextChanged" AutoPostBack="True"></asp:TextBox>
                            </div>
                        </div>
                        <div class="table_Tour">
                            <asp:GridView ID="GridView1" runat="server" CssClass="mytable" AutoGenerateColumns="False" Width="100%" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" CellPadding="4" ForeColor="#333333" GridLines="None">
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:TemplateField Visible="false">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbMa" Text='<%# Eval("TourId") %>'>&nbsp;&nbsp;  </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="STT">
                                        <ItemTemplate>
                                            <%# Container.DataItemIndex + 1 %>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Mã tour">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("MaTour")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Tên tour">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("TourName")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Lịch trình">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("Schedule")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Ngày BD">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("CTBeginDate")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Ngày KT">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("CTEndDate")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Người lớn">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("CTQuantityAdults")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Trẻ em">
                                        <ItemTemplate>
                                            <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("CTQuantityChild")  %>'> </asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Trẻ nhỏ">
                                        <ItemTemplate>
                                            <%--      <asp:Label runat="server" ID="lbNoiDung" Text='  <%#  Eval("CTQuantityBaby")  %>'> </asp:Label>--%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:CommandField ShowSelectButton="True" />
                                </Columns>
                                <EditRowStyle BackColor="#2461BF" />
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            </asp:GridView>
                        </div>

                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Tên tour</span><br />
                        <asp:TextBox ID="txtCusTourName" runat="server" CssClass="txttext txtCusTourName" Width="185px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Mã Tour</span><br />
                        <asp:TextBox ID="txtCusTourId" runat="server" CssClass="txttext txtCusTourId" Width="80px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Ngày khởi hành</span><br />
                        <asp:TextBox ID="txtCusBeginDate" runat="server" CssClass="txttext txtCusBeginDate" Width="165px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Hình thức lưu trú</span><br />
                        <asp:DropDownList ID="ddlCusStay" runat="server" CssClass="txttextdll ddlCusStay" Width="105px"></asp:DropDownList>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Số ngày </span>
                        <br />
                        <asp:TextBox ID="txtCusQuantityDay" runat="server" CssClass="txttext txtCusQuantityDay" Width="115px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Số đêm </span>
                        <br />
                        <asp:TextBox ID="txtCusQuantityNight" runat="server" CssClass="txttext txtCusQuantityNight" Width="115px"></asp:TextBox>
                    </div>
                    <div class="k_Tour_full">
                        <span class="k_Tour_title">II.Số lượng khách</span>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Người Lớn</span><br />
                        <asp:TextBox ID="txtCusQuantityAdult" runat="server" CssClass="txttext txtCusQuantityAdult" Width="80px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Trẻ Em</span><br />
                        <asp:TextBox ID="txtCusQuantityChild" runat="server" CssClass="txttext txtCusQuantityChild" Width="80px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Trẻ Nhỏ</span><br />
                        <asp:TextBox ID="txtCusQuantityBaby" runat="server" CssClass="txttext txtCusQuantityBaby" Width="80px"></asp:TextBox>
                    </div>
                    <div class="k_Tour_full">
                        <span class="k_Tour_title">III.Thông tin điểm đón - trả khách</span>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Điểm đón</span><br />
                        <asp:TextBox ID="txtCusBeginLocation" runat="server" CssClass="txttext txtCusBeginLocation" Width="295px"></asp:TextBox>
                    </div>
                    <div class="k_Tour">
                        <span class="lbnametour">Điểm trả </span>
                        <br />
                        <asp:TextBox ID="txtCusEndLocation" runat="server" CssClass="txttext txtCusEndLocation" Width="295px"></asp:TextBox>
                    </div>

                </div>
            </div>

        </div>
    </div>
</asp:Content>
